home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / DEMOS / FLYNS / !FLyns / !Help < prev    next >
Text File  |  1996-03-16  |  2KB  |  56 lines

  1. /********************************************************************/
  2. /*     -=[FlY'96]=- presents !FLYns a lens effect tutorial ....     */
  3. /********************************************************************/
  4.  
  5. So here is my second little code on Arm machine :) (first !Flyre a 
  6. fire effect ... some bugs still have to be fixed ;( )
  7.  
  8. This piece of code demonstrate the LENS effect.
  9.  
  10. I include the sources (in C) for you all other beginner that maybe 
  11. wanted to code such little things ;)
  12.  
  13. I find the C sources self explaining. However let resume the idea of
  14. the LENS:
  15.     you want to deform a piece of image on a spherical object (
  16.     or any other object that you want if you have a formula ) so
  17.     the goal is to precalculate the deformation in a table ( see
  18.     the C code buildlens ) and then always copy a source block,
  19.     apply the deformation using the table in a destination block
  20.     (see createlens) and display that block... then you restore
  21.     the old image block (source) and restart with first copying
  22.     a new source block to deform ... that's very simple...
  23.     
  24.     In the C code provided I do not restore the old source becoz
  25.     of the way the ball move do not destroy the borders around
  26.     the ball so I don't have to restore anything. However the 
  27.     restore C piece of code is provided if you want another 
  28.     -moving path- for the ball, just uncomment restorescr in the
  29.     do {} by deleting the '//' ... 
  30.     
  31. SORRY:
  32.     The present code is not that fast becoz it's not ARM pure juice.
  33.     Sorry about that... It may then not run very smoothly on many
  34.     Acorns ... It runs ok on my A5000 but I don't know for the other
  35.     machines...
  36.     
  37. NOTE:
  38.     This little demo is mostly intended for beginners like me that have
  39.     always wanted to have sources to understand the effects and maybe
  40.     (who knows ?) become one day a good coder :)
  41.     
  42. GREETINGS:
  43.     Just want to say hello to some friends around: Daniel who greatly 
  44.     helped me in my first steps, Armoric the master of 3Kb Basic ARM
  45.     powered effects :) , BASS (lo John, Karl, Gil and the others...),
  46.     And all the demo scene (if there is any ...;) ) !
  47.  
  48. SPECIAL:
  49.     special thanx to the drawer of the picture I use in !Flyns .......
  50.     (picture from The Party 1995: Roswell drawn by Mon/Oxygene)
  51.     
  52. ADDRESS:
  53.     if u want just drop me a mail to ahuet@ulb.ac.be ... 
  54.     ( available to august 96 at least )
  55. <EOF>
  56.